import request from '@/utils/request'
/**
 * 列表
 * @returns
 */
export function GetListAPI(params) {

    return request({
        url: '/web/specialCheckTasks/list',
        method: 'GET',
        params
    })
}

/**
 * 报表列表
 * @returns
 */
export function GetStatementListAPI(params) {

    return request({
        url: '/web/statistical/statement/temporarily',
        method: 'GET',
        params
    })
}

/**
 * 明细列表
 * @returns
 */
export function GetListDetailAPI(params) {

    return request({
        url: '/web/specialCheckTasksDetails/list',
        method: 'GET',
        params
    })
}


/**
 * 
 * @param {*} data 
 * 新增
 */
export function AddDataAPI(data) {
    return request({
        url: '/web/specialCheckTasks',
        method: 'POST',
        data
    })
}

/**
 * 
 * @param {*} data 
 * 明细新增
 */
export function AddDataDetailAPI(data) {
    return request({
        url: '/web/specialCheckTasksDetails',
        method: 'POST',
        data
    })
}
/**
 * 回显
 */
export function GetViewAPI(data) {
    return request({
        url: '/web/specialCheckTasks/' + data,
        method: 'GET',


    })
}

/**
 * 回显明细
 */
export function GetViewdetailAPI(data) {
    return request({
        url: '/web/specialCheckTasksDetails/' + data,
        method: 'GET',


    })
}

/**
 * 修改
 * @param {*} data 
 * @returns 
 */
export function EditDataAPI(data) {
    return request({
        url: '/web/specialCheckTasksDetails',
        method: 'PUT',
        data
    })
}

// 删除
export function DelDataAPI(data) {
    return request({
        url: '/web/specialCheckTasks/' + data,
        method: 'DELETE'
    })
}

// 明细删除
export function DelDataDetailAPI(data) {
    return request({
        url: '/web/specialCheckTasksDetails/' + data,
        method: 'DELETE'
    })
}


/**
 * 人员
 */
export function GetdeptUserTreeAPI(data) {
    return request({
        url: '/api/system/dept/treeSelect',
        method: 'GET',


    })
}
/*角色 */

export const GetRoleAPI = () => {
    return request({
        url: "/api/system/role/list",
        method: "GET",

    })
}
/**
 * 下发保存
 */
export function DeliveryAPI(data) {
    return request({
        url: '/web/specialCheckTasks/issue',
        method: 'post',
        data
    })
}